<!--排行榜-礼物-->
<template>
	<view class="hdtybox" style="padding-top: 0;" :class="hdc">
		<topboxVue :tit="$t('liwu')"></topboxVue>
		<view class="lwbox">
			<view class="clearfloat mb30 tc">
				<view class="lwbox-chitem bj_center" :class="item.ch ? 'lwbox-chact' : ''" v-for="item in tbch"
					@click="chtag(item)">
					{{item.name}}
				</view>
			</view>
			<view class="f22">
				{{$t("liwu.txt")}}
			</view>

			<view class="">

				<view class="lwbox-ndtxt">
					{{$t("liwu.notdata")}}
				</view>

			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref,
		inject,
		provide
	} from 'vue';
	import useI18n from '@/store/useI18n.js'
	import topboxVue from '../common/topbox.vue';
	const {
		t
	} = useI18n()
	provide("repage", repage);
	// 父级关闭活动的方法
	const clhd = inject("clhd");
	let hdc = ref("hdpagein")

	let tbch = ref([{
			name: t("liwu.c1"),
			ch: true,
			tag: 1
		},
		{
			name: t("liwu.c2"),
			ch: false,
			tag: 0
		}
	])

	function chtag(item) {
		for (var i = 0; i < tbch.value.length; i++) {
			tbch.value[i].ch = false
		}
		item.ch = true
	}

	function repage() {
		hdc.value = "hdpageout";
		clhd();
	}
</script>

<style scoped lang="scss">
	.lwbox {
		padding: 0 14rpx;

		&-chitem {
			float: left;
			width: 50%;
			height: 104rpx;
			font-size: 28rpx;
			color: #A2B5D5;
			background: #003311;
			padding: 0 94rpx;
		}

		&-chact {
			color: #FFFFFF;
			background: url("/static/page2/c.png") no-repeat center center;
			background-size: 100% 100%;
		}

		&-ndtxt {
			width: 100%;
			height: 500rpx;
			background: url("/static/fx/nd.png") no-repeat center 0;
			background-size: 450rpx auto;
			padding-top: 312rpx;
			color: #9C9FB2;
			text-align: center;
			font-size: 28rpx;
			margin-top: 160rpx;
		}
	}
</style>